<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>docs</title>
    <style>
        .upload_link {
            display: block;
            text-align: center;
            text-decoration: none;
            position: absolute;
            bottom: 20px;
            left: 0;
            right: 0;
        }

        .upload_btn {
            padding-inline: 30px;
            padding-top: 7px;
            padding-bottom: 7px;
        }

        @media (max-width: 700px) {
            .a_link {
                width: 80px;
                margin: 10px;
            }

            img {
                width: 80px;
                height: 80px;
                margin-left: 20px;
            }
        }

        /* 超小屏幕（手机，小于 768px） */
        @media (min-width: 700px) {
            .a_link {
                width: 200px;
                margin: 10px;
            }

            img {
                width: 130px;
                height: 130px;
                margin-left: 20px;
            }
        }
    </style>
</head>

<body>

    <text id="disinfo_text" style="margin-left: 30px;margin-top: 30px;line-height: 50px;">0G/0G</text>

    <br />

    <progress value="10" max="100" id="disk_progress" style="margin-left:30px;width: 60%;"></progress>

    <text id="disk_container" style="margin-left: 2%;">400GB</text>

    <div style="margin-left:10px;margin-top:30px">
        <!-- <a href="windowImages.html" target="_blank"><img src="ic_img_dir.png" /></a>
        <a href="windowsMusic.html" target="_blank"><img src="ic_music_dir.png" /></a>
        <a href="windowsVideo.html" target="_blank"><img src="ic_video_dir.png" /></a> -->
        <!-- <a href="windowDocs.html" target="_blank"><img src="ic_doc_dir.png" /></a>
        <a href="windowOtherFiles.html" target="_blank"><img src="ic_file_dir.png" /></a> -->

        <!-- <a href="windowFiles.html?method=getDocs" target="_blank"><img src="ic_doc_dir.png" /></a>
        <a href="windowFiles.html?method=getOtherFiles" target="_blank"><img src="ic_file_dir.png" /></a> -->

        <!-- <a href="docs" target="_blank"><img src="ic_doc_dir.png" /></a>
        <a href="other" target="_blank"><img src="ic_file_dir.png" /></a> -->


        <!-- <a href="viewFiles.html?path=images" target="_blank"><img src="ic_img_dir.png" /></a> -->
        <a href="viewImagesPage.html" target="_blank"><img src="ic_img_dir.png" /></a>

        <a href="windowsMusic.html" target="_blank"><img src="ic_music_dir.png" /></a>
        <!-- <a href="viewFiles.html?path=videos" target="_blank"><img src="ic_video_dir.png" /></a> -->
        <a href="viewVideosPage.html" target="_blank"><img src="ic_video_dir.png" /></a>

        <!-- <a href="windowDocs.html" target="_blank"><img src="ic_doc_dir.png" /></a>
        <a href="windowOtherFiles.html" target="_blank"><img src="ic_file_dir.png" /></a> -->

        <a href="docs" target="_blank"><img src="ic_doc_dir.png" /></a>
        <a href="viewFiles.html?path=other" target="_blank"><img src="ic_file_dir.png" /></a>
    </div>


    <br />
    <br />
    <br />
    <br />
    <br />

    <a href="uploadMultiFile.html" class="upload_link" target="_blank"><button class="upload_btn">去上传</button></a>

    <script type="text/javascript" src="./getrequest.js"></script>
    <script type="text/javascript">
        getRequest("https://" + location.host
            + "/getDiskInfo", "", function (res) {
                let result = JSON.parse(res)
                console.log(result.all)
                let progress = document.getElementById("disk_progress")
                progress.max = result.all
                progress.value = result.used
                document.getElementById("disk_container").innerText = result.all / 1000 + "GB"

                document.getElementById("disinfo_text").innerText = "Used:  " + (result.used / 1000) + "GB   /Free:  " + (result.free / 1000) + "GB"
            })
    </script>
</body>

</html>
